<?php
if(!check_manager_login()) exit('无权查看，请登录!');
require_once(MODEL_PATH.DS.'Category.php');
$Category = new Category();
$id = isset($_GET['id'])?$_GET['id']:0;
$id_arr = explode(",",$id);
foreach($id_arr as $cid){
	$res = $Category->getCategoryByPid($cid);
	if($res){
		redirect('index.php?mod=category&act=list','请先删除下级分类，再删除本分类！');
	}
}
$result = $Category->delCategory($id);
if($result){
	redirect('index.php?mod=category&act=list','删除成功！');
}
?>